package top.xiaozhaobk.xiaofenshu.distributed.id.generator.api;

import jakarta.annotation.Resource;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import top.xiaozhaobk.xiaofenshu.distributed.id.generator.constants.ApiConstants;

@FeignClient(value = ApiConstants.SERVICE_NAME)
public interface DistributedIdGeneratorFeignApi {
    String PREFIX = "/id";

    @RequestMapping(value = PREFIX + "/segment/get/{key}")
    String getSementId(@PathVariable("key") String key);

    @RequestMapping(value = PREFIX + "/snowflake/get/{key}")
    String getSnowflakeId(@PathVariable("key") String key);

}
